package com.admgt.profile.ui;

import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
import java.awt.Container;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;

import javax.swing.BorderFactory;
import javax.swing.JButton;
import javax.swing.JCheckBox;
import javax.swing.JComboBox;
import javax.swing.JLabel;
import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;
import javax.swing.JPanel;
import javax.swing.JRadioButton;
import javax.swing.JTextField;

/**
 *
 * @author James
 */
public class TemplateEditFrame extends javax.swing.JFrame {
	private static final long serialVersionUID = 8771076088884228291L;
	private JPanel panelNorth;
	private JPanel panelTop;
	private JPanel panelBottom;
	private JPanel panelLeft;
	private JPanel panelRight;
	private JPanel panelSouth;
	/**
     * Creates new form TemplateFrame
     */
    public TemplateEditFrame() {
        init();
    }

    private void init() {
    	setTitle("模板编辑");
    	setSize(900,800);
    	setContentPane(createContentPane());
    	setMenu();
    	setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);
    	pack();
    	addWindowListener(new WindowAdapter(){
			@Override
			public void windowClosing(WindowEvent e) {
				System.exit(0);
			}
    	});
	}

	private void setMenu() {
		JMenuBar jMenuBar1 = new javax.swing.JMenuBar();
		JMenu jMenu1 = new javax.swing.JMenu();
		JMenuItem jMenuItem1 = new javax.swing.JMenuItem();
		JMenu jMenu2 = new javax.swing.JMenu();
		
		 jMenu1.setText("File");
	        jMenuItem1.setText("jMenuItem1");
	        jMenu1.add(jMenuItem1);
	        jMenuBar1.add(jMenu1);
	        jMenu2.setText("Edit");
	        jMenuBar1.add(jMenu2);
	        setJMenuBar(jMenuBar1);
	        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
	        getContentPane().setLayout(layout);
	        layout.setHorizontalGroup(
	            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
	            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
	                .addContainerGap()
	                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
	                    .addComponent(panelSouth, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
	                    .addComponent(panelNorth, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
	                .addContainerGap())
	        );
	        layout.setVerticalGroup(
	            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
	            .addGroup(layout.createSequentialGroup()
	                .addContainerGap()
	                .addComponent(panelNorth, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
	                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 8, Short.MAX_VALUE)
	                .addComponent(panelSouth, javax.swing.GroupLayout.PREFERRED_SIZE, 166, javax.swing.GroupLayout.PREFERRED_SIZE)
	                .addGap(29, 29, 29))
	        );
	}

	private Container createContentPane() {
		JPanel panelBoard = new JPanel(new BorderLayout());
		panelBoard.add(BorderLayout.NORTH,createNorthPane());
		panelBoard.add(BorderLayout.SOUTH,createSouthPane());
		panelBoard.setBorder(BorderFactory.createLineBorder(Color.blue));
		return panelBoard;
	}
	

	private Component createNorthPane() {
		panelNorth = new javax.swing.JPanel();
		JPanel panelField = new javax.swing.JPanel();
		JButton buttonNext = new javax.swing.JButton();
		buttonNext.setText("下一步");
		
		panelNorth.setBackground(new java.awt.Color(153, 153, 255));

        panelField.setBackground(new java.awt.Color(153, 255, 153));

        javax.swing.GroupLayout panelFieldLayout = new javax.swing.GroupLayout(panelField);
        panelField.setLayout(panelFieldLayout);
        panelFieldLayout.setHorizontalGroup(
            panelFieldLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 100, Short.MAX_VALUE)
        );
        panelFieldLayout.setVerticalGroup(
            panelFieldLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 100, Short.MAX_VALUE)
        );

        

        javax.swing.GroupLayout panelNortheLayout = new javax.swing.GroupLayout(panelNorth);
        panelNorth.setLayout(panelNortheLayout);
        panelNortheLayout.setHorizontalGroup(
        		panelNortheLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelNortheLayout.createSequentialGroup()
                .addGap(215, 215, 215)
                .addComponent(panelField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelNortheLayout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(buttonNext)
                .addContainerGap())
        );
        panelNortheLayout.setVerticalGroup(
        		panelNortheLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelNortheLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(buttonNext)
                .addGap(60, 60, 60)
                .addComponent(panelField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(95, Short.MAX_VALUE))
        );
        panelNorth.setBorder(BorderFactory.createLineBorder(Color.red));
		return panelNorth;
	}

	private Component createSouthPane() {
		panelSouth = new JPanel(new BorderLayout());
		panelSouth.add(BorderLayout.NORTH,createTopPane());
		panelSouth.add(BorderLayout.SOUTH,createBottomPane());
		
		javax.swing.GroupLayout panelSouthLayout = new javax.swing.GroupLayout(panelSouth);
		panelSouth.setLayout(panelSouthLayout);
        panelSouthLayout.setHorizontalGroup(
        		panelSouthLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelSouthLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(panelSouthLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(panelTop, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(panelBottom, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );
        panelSouthLayout.setVerticalGroup(
        		panelSouthLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelSouthLayout.createSequentialGroup()
                .addComponent(panelTop, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(panelBottom, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(23, Short.MAX_VALUE))
        );
		panelSouth.setBorder(BorderFactory.createLineBorder(Color.green));
		return panelSouth;
	}

	private Component createTopPane() {
		panelTop = new JPanel(new BorderLayout());
		JLabel labelTemplate = new javax.swing.JLabel();
		JComboBox comboBoxTemplate = new javax.swing.JComboBox();
		JButton buttonSave = new javax.swing.JButton();
		JButton buttonSaveTo = new javax.swing.JButton();
		JButton btNewTemplate = new javax.swing.JButton();
		JButton btDelTemplate = new javax.swing.JButton();
		
		labelTemplate.setText("模板：");
        comboBoxTemplate.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Template 1", "Template 2", "Template 3" }));
        buttonSave.setText("保存");
        buttonSaveTo.setText("另存为");
        btNewTemplate.setText("新建模板");
        btDelTemplate.setText("删除模板");
        
        javax.swing.GroupLayout panelTopLayout = new javax.swing.GroupLayout(panelTop);
        panelTop.setLayout(panelTopLayout);
        panelTopLayout.setHorizontalGroup(
        		panelTopLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelTopLayout.createSequentialGroup()
                .addGap(56, 56, 56)
                .addComponent(labelTemplate)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(comboBoxTemplate, javax.swing.GroupLayout.PREFERRED_SIZE, 166, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(55, 55, 55)
                .addComponent(buttonSave)
                .addGap(18, 18, 18)
                .addComponent(buttonSaveTo)
                .addGap(18, 18, 18)
                .addComponent(btNewTemplate)
                .addGap(18, 18, 18)
                .addComponent(btDelTemplate)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        panelTopLayout.setVerticalGroup(
        		panelTopLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelTopLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(panelTopLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(labelTemplate, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(comboBoxTemplate, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(buttonSave, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(buttonSaveTo, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(btNewTemplate, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(btDelTemplate, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );
        panelTop.setBorder(BorderFactory.createLineBorder(Color.orange));
		return panelTop;
	}

	private Component createBottomPane() {
		 panelBottom = new JPanel(new BorderLayout());
		 panelBottom.add(BorderLayout.WEST,createLeftPane());
		 panelBottom.add(BorderLayout.EAST,createRightPane());
		 
		 javax.swing.GroupLayout panelBottomLayout = new javax.swing.GroupLayout(panelBottom);
		 panelBottom.setLayout(panelBottomLayout);
		 panelBottomLayout.setHorizontalGroup(
				 panelBottomLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
	            .addGroup(panelBottomLayout.createSequentialGroup()
	                .addComponent(panelLeft, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
	                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
	                .addComponent(panelRight, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
	        );
		 panelBottomLayout.setVerticalGroup(
				 panelBottomLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
	            .addGroup(panelBottomLayout.createSequentialGroup()
	                .addContainerGap()
	                .addGroup(panelBottomLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
	                    .addComponent(panelLeft, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
	                    .addComponent(panelRight, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
	                .addContainerGap(26, Short.MAX_VALUE))
	        );

		panelBottom.setBorder(BorderFactory.createLineBorder(Color.yellow));
		return panelBottom;
	}

	private Component createLeftPane() {
		panelLeft = new javax.swing.JPanel();
		JLabel    labelType = new javax.swing.JLabel();
		JRadioButton    radioType = new javax.swing.JRadioButton();
		JLabel    labelResolution = new javax.swing.JLabel();
		JCheckBox    checkBackGround = new javax.swing.JCheckBox();
		JTextField    textTemplate = new javax.swing.JTextField();
		JButton    buttonNavigator = new javax.swing.JButton();
		JComboBox    comboResolution = new javax.swing.JComboBox();
		 labelType.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
	        labelType.setText("类型：");
	        radioType.setText("Android");
	        labelResolution.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
	        labelResolution.setText("分辨率:");
	        checkBackGround.setText("模板背景");
	        checkBackGround.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
	        checkBackGround.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT);
	        buttonNavigator.setText("浏览");
	        
	        textTemplate.addActionListener(new java.awt.event.ActionListener() {
	            public void actionPerformed(java.awt.event.ActionEvent evt) {
	                textTemplateActionPerformed(evt);
	            }
	        });

	        comboResolution.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "1024 x 768", "1050 x 1680", "1080 x 1920", "1200 x 1600", "1200 x 1920", "1280 x 1024" }));

	        javax.swing.GroupLayout panelLeftLayout = new javax.swing.GroupLayout(panelLeft);
	        panelLeft.setLayout(panelLeftLayout);
	        panelLeftLayout.setHorizontalGroup(
	        		panelLeftLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
	            .addGroup(panelLeftLayout.createSequentialGroup()
	                .addContainerGap()
	                .addGroup(panelLeftLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
	                    .addGroup(panelLeftLayout.createSequentialGroup()
	                        .addComponent(checkBackGround, javax.swing.GroupLayout.PREFERRED_SIZE, 81, javax.swing.GroupLayout.PREFERRED_SIZE)
	                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
	                        .addComponent(textTemplate, javax.swing.GroupLayout.DEFAULT_SIZE, 225, Short.MAX_VALUE)
	                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
	                        .addComponent(buttonNavigator))
	                    .addGroup(panelLeftLayout.createSequentialGroup()
	                        .addGroup(panelLeftLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
	                            .addComponent(labelResolution, javax.swing.GroupLayout.DEFAULT_SIZE, 85, Short.MAX_VALUE)
	                            .addComponent(labelType, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
	                        .addGap(110, 110, 110)
	                        .addGroup(panelLeftLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
	                            .addComponent(radioType)
	                            .addComponent(comboResolution, javax.swing.GroupLayout.PREFERRED_SIZE, 103, javax.swing.GroupLayout.PREFERRED_SIZE))
	                        .addContainerGap())))
	        );
	        panelLeftLayout.setVerticalGroup(
	        		panelLeftLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
	            .addGroup(panelLeftLayout.createSequentialGroup()
	                .addContainerGap()
	                .addGroup(panelLeftLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
	                    .addComponent(labelType, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)
	                    .addComponent(radioType, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
	                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
	                .addGroup(panelLeftLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
	                    .addComponent(labelResolution, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
	                    .addComponent(comboResolution, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
	                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
	                .addGroup(panelLeftLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
	                    .addComponent(checkBackGround)
	                    .addComponent(textTemplate, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
	                    .addComponent(buttonNavigator))
	                .addContainerGap(49, Short.MAX_VALUE))
	        );
	        
	        
	        panelLeft.setBorder(BorderFactory.createLineBorder(Color.blue));
		return panelLeft;
	}

	private Component createRightPane() {
		panelRight = new javax.swing.JPanel();
		JLabel labelFieldAttr = new javax.swing.JLabel();
		JLabel    labelX = new javax.swing.JLabel();
		JLabel    labelY = new javax.swing.JLabel();
		JLabel    labelWidth = new javax.swing.JLabel();
		JLabel    labelHight = new javax.swing.JLabel();
		JTextField    textX = new javax.swing.JTextField();
		JTextField    textY = new javax.swing.JTextField();
		JTextField    textWidth = new javax.swing.JTextField();
		JTextField    textHight = new javax.swing.JTextField();
		JButton    buttonModify = new javax.swing.JButton();
		labelFieldAttr.setText("区域属性：");
        labelX.setText("横坐标:");
        labelY.setText("纵坐标:");
        labelWidth.setText("宽度:");
        labelHight.setText("高度:");
        buttonModify.setText("修改");
        
        javax.swing.GroupLayout panelRightLayout = new javax.swing.GroupLayout(panelRight);
        panelRight.setLayout(panelRightLayout);
        panelRightLayout.setHorizontalGroup(
        		panelRightLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelRightLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(panelRightLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(panelRightLayout.createSequentialGroup()
                        .addComponent(labelFieldAttr, javax.swing.GroupLayout.PREFERRED_SIZE, 88, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addContainerGap())
                    .addGroup(panelRightLayout.createSequentialGroup()
                        .addGroup(panelRightLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(panelRightLayout.createSequentialGroup()
                                .addGap(36, 36, 36)
                                .addComponent(labelX))
                            .addComponent(labelWidth, javax.swing.GroupLayout.Alignment.TRAILING))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(panelRightLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(textWidth, javax.swing.GroupLayout.DEFAULT_SIZE, 69, Short.MAX_VALUE)
                            .addComponent(textX))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(panelRightLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addGroup(panelRightLayout.createSequentialGroup()
                                .addGap(8, 8, 8)
                                .addComponent(labelHight)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(textHight))
                            .addGroup(panelRightLayout.createSequentialGroup()
                                .addComponent(labelY)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(textY, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 41, Short.MAX_VALUE)
                        .addComponent(buttonModify))))
        );
        panelRightLayout.setVerticalGroup(
        		panelRightLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelRightLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(labelFieldAttr)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(panelRightLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(labelX)
                    .addComponent(labelY)
                    .addComponent(textX, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(textY, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(panelRightLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(labelWidth)
                    .addComponent(labelHight)
                    .addComponent(textWidth, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(textHight, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(buttonModify))
                .addContainerGap(19, Short.MAX_VALUE))
        );
        
        panelRight.setBorder(BorderFactory.createLineBorder(Color.green));
		return panelRight;
	}


    private void textTemplateActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_textTemplateActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_textTemplateActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(TemplateEditFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(TemplateEditFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(TemplateEditFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(TemplateEditFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new TemplateEditFrame().setVisible(true);
            }
        });
    }
   
}
